/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package res;

import java.util.HashMap;
import javafx.scene.image.Image;

/**
 *
 * @author sutter
 */
public class ImageLoader {
	private static HashMap<String,Image> imageMap = new HashMap<>();
	
	public static Image getImage(String name) {
		Image image;
		
		image = imageMap.get(name);
		if(image == null) {
			image = new Image(imageMap.getClass().getResourceAsStream("/res/" + name));
		}
		return image;
	}
}
